#!/bin/sh /etc/rc.common

START=99
STOP=10

TYPE=$(uci get unblockmusic.@unblockmusic[0].musicapptype)
PORT=$(uci get unblockmusic.@unblockmusic[0].port)


start()
{
	stop
	enable=$(uci get unblockmusic.@unblockmusic[0].enabled)
	[ $enable -eq 0 ] && exit 0
	node /usr/share/unblockmusic/app.js -p $PORT &
}

stop()
{
	kill -9 $(ps | grep app.js | grep -v grep | awk '{print $1}') >/dev/null 2>&1 
}



